<% layout("/layouts/micro.html"){ %>
<div class="layui-tab layui-tab-brief childrenBody">
	<ul class="layui-tab-title">
		<li><a href="${ctx}/wx/wxAccountMenu/">公众号菜单列表</a></li>
		<li class="layui-this">
			<a href="${ctx}/wx/wxAccountMenu/form?id=${wxAccountMenu.id}&parent.id=${wxAccountMenu.parent.id!}">
				公众号菜单<%if(shiro.hasPermission("wx:wxAccountMenu:edit")){%>${isNotEmpty(wxAccountMenu.id)?'修改':'添加'}<%}%>
				<%if(shiro.lacksPermission("wx:wxAccountMenu:edit")){%>查看<%}%>
			</a>
		</li>
	</ul>
	<div class="layui-tab-content">
	<form id="inputForm" action="${ctx}/wx/wxAccountMenu/save" method="post" class="layui-form" >
		<input type="hidden" name="id" value="${wxAccountMenu.id}"/>
		<input type="hidden" name="groupId" value="1"/>
		<#message content="${message!}"/>
		<div class="layui-form-item">
			<label class="layui-form-label">菜单键值：</label>
			<div class="layui-input-inline">
				<input name="eventKey" value="${wxAccountMenu.eventKey}" maxlength="40" class="layui-input"/>
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">菜单名称：</label>
			<div class="layui-input-block">
				<input name="name" value="${wxAccountMenu.name}" maxlength="40" class="layui-input" lay-verify="required"/>
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">上级菜单：</label>
			<div class="layui-input-inline">
				<#treeselect id="parent" name="parent.id" value="${wxAccountMenu.parent.id!}" labelName="parent.name" labelValue="${wxAccountMenu.parent.name!}"
								title="上级菜单" url="/wx/wxAccountMenu/treeData" extId="${wxAccountMenu.id}" cssClass="" allowClear="true"/>
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">排序：</label>
			<div class="layui-input-inline">
				<input name="sort" value="${wxAccountMenu.sort}" maxlength="11" class="layui-input"/>
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">菜单类型：</label>
			<div class="layui-input-block">
				<input type="radio" name="type" value="view" checked title="网页链接" onclick="$('#VIEW_URL').show();$('#IS_OAUTH').show();">
				<input type="radio" name="type" value="click" title="点击事件" onclick="$('#VIEW_URL').hide();$('#IS_OAUTH').hide();">
			</div>
		</div>
		<div class="layui-form-item" id="IS_OAUTH">
			<label class="layui-form-label">是否需授权：</label>
			<div class="layui-input-block">
				<#radio name="oauth" items="${@DictUtils.getDictList('yes_no')}" value="${wxAccountMenu.oauth}" />
			</div>
		</div>
		<div class="layui-form-item" id="VIEW_URL">
			<label class="layui-form-label">访问URL：</label>
			<div class="layui-input-block">
				<input name="viewUrl" value="${wxAccountMenu.viewUrl}" maxlength="2000" class="layui-input "/>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-input-block">
				<%if(shiro.hasPermission("sys:area:edit")){%>
					<button class="layui-btn" lay-filter="*" lay-submit>保 存</button>
				<%}%>
				<button type="reset" class="layui-btn layui-btn-primary" onclick="history.go(-1)">返回</button>
			</div>
		</div>
	</form>
	</div>
</div>
<%}%>